package com.fxz.edu.ad.controller;


import com.fxz.edu.ad.entity.PromotionSpace;
import com.fxz.edu.ad.service.IPromotionSpaceService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Fxz
 * @since 2021-08-29
 */
@AllArgsConstructor
@RestController
public class PromotionSpaceController {

    private IPromotionSpaceService promotionSpaceService;

    /**
     * 返回所有广告位
     *
     * @return
     */
    @RequestMapping("/getAllSpace")
    public List<PromotionSpace> getAllSpaces() {
        return promotionSpaceService.list();
    }

}
